<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
dim id,rsa1,sqla1,title,author,company,tel,content,rsa2,sqla2,email,visible,fax,typeid,path,category,lang
id=GetIntQueryString("id")
Set rsa1 = Server.CreateObject("ADODB.Recordset")
sqla1 = "select * from [c_comment] where id="&id
rsa1.open sqla1,conn,1,1
title=rsa1("title")
author=rsa1("author")
company=rsa1("company")
tel=rsa1("tel")
fax=rsa1("fax")
lang=rsa1("lang")
typeid=rsa1("typeid")
Dim rs2,sql2
Set rs2 = Server.CreateObject("ADODB.Recordset")
sql2 = "select * from [c_type] where id="&typeid
rs2.open sql2,conn,1,1
If Not rs2.eof Then
category=rs2("name")
End If 
rs2.close
Set rs2=Nothing 
content=rsa1("content")
email=rsa1("email")
visible=rsa1("visible")
rsa1.close
Set rsa1=Nothing
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>显示留言</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="JavaScript" src="admin_js/common.js"></script>
</head>
<body>
<br>
<table class="table_800" cellspacing="0" cellpadding="0">
<tr>
	<th colspan="2">留言管理</th>
</tr>
<tr  class="row">
	<td>标题</td>
	<td>&nbsp;<%=title%></td>
</tr>
<tr class="row">
	<td>类别</td>
	<td>&nbsp;<%=category%></td>
</tr>
<tr class="row">
	<td>姓名</td>
	<td>&nbsp;<%=author%></td>
</tr>
<tr  class="row">
	<td>公司名称</td>
	<td>&nbsp;<%=company%></td>
</tr>
<tr class="row">
	<td>Email</td>
	<td>&nbsp;<%=email%></td>
</tr>
<tr class="row">
	<td>联系电话</td>
	<td>&nbsp;<%=tel%></td>
</tr>
<tr class="row">
	<td>传真</td>
	<td>&nbsp;<%=fax%></td>
</tr>
<tr  class="row">
	<td>详细内容</td>
	<td>&nbsp;<%=content%>
	</td>
</tr>
<tr  class="row">
	<td>审核状态</td>
	<td>&nbsp;
	<a href="comment_changestate.asp?fr=commentshow&id=<%=id%>">
	<%If visible=1 Then response.write("通过") Else response.write("未通过") End If %>
	</a>
	</td>
</tr>
<%
Set rsa2 = Server.CreateObject("ADODB.Recordset")
sqla2 = "select * from [c_reply] where commentid="&CInt(id)
rsa2.open sqla2,conn,1,1
If Not rsa2.eof Then
%>
<tr class="row">
	<td>已有回复&nbsp;&nbsp;</td>
	<td>
	<ul>
		<%Do While Not rsa2.eof%>
		<li><%=rsa2("content")%><a href="comment_reply_delete.asp?id=<%=rsa2("id")%>&commentid=<%=id%>">[删除]</a><br><font color="#A5A5A5">[回复人：<%=rsa2("replyauthor")%>&nbsp;回复时间：<%=rsa2("replytime")%>]</font>
		<%
		rsa2.movenext
		loop%>
	</ul>
	</td>
</tr>
<%
End If 
rsa2.close
Set rsa2=Nothing
%>
</table>
<br/>
<form method="post" name="rzform" action="comment_reply_save.asp">
<table cellspacing="0" cellpadding="0" class="table_800">
<input type="hidden" id="commentcontent" name="commentcontent" value="<%=content%>">
<input type="hidden" id="lang" name="lang" value="<%=lang%>">
<input type="hidden" id="title" name="title" value="<%=title%>">
<input type="hidden" name="id" value="<%=id%>">
<tr>
	<th colspan="2"><b><font color="#1362B5">回复留言</th>
</tr>
<tr>
	<td><font color="red">*</font>&nbsp;&nbsp;回复内容&nbsp;&nbsp;</td>
	<td>
	<textarea name="content" id="content" rows="10" cols="80"></textarea>
	</td>
</tr>
<%If  IsObjInstalled("JMail.Message") Then%>
<tr><td colspan="2">
<input type="checkbox" id="sendmail" name="sendmail" value="1"/>发送邮件给回复者（注意有些网友可能乱填Email，则不宜发送）<input type="text" id="tomail" name="tomail" value="<%=email%>">
</td></tr>
<%End If %>
<tr>
	<td  colspan="2" class="tdcenter">
	<input type="button" value="保存" class="btn" onclick="checkForm('addreply');"/>&nbsp;&nbsp;<input type="reset" class="btn" value="重置">&nbsp;&nbsp;<input type="button" class="btn"  value="<%out("lang_back")%>" onclick="javascript:location.href='comment_list.asp'"/></td>
</tr>
</table>
</form>
</body>
</html>
